package name.huzhenbo.java.patterns.mediator;

class Director {
    private Service anotherService = new AnotherNaiveService();
    private Service service = new NaiveService();

    public String clientChanged(Client client) {
        if (client instanceof AnotherNaiveClient) {
            return anotherService.doSomething();
        } else if (client instanceof NaiveClient) {
            return service.doSomething();
        }
        return null;
    }
}
